package com.wsd.smartcarwasher.dao;

import com.wsd.smartcarwasher.domain.Activity;
import com.wsd.smartcarwasher.domain.Card;
import com.wsd.smartcarwasher.domain.Coupon;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ActivityDao {


    List<Activity> getNewActivity();


    int insert(Activity activity);


    int insertSelective(Activity activity);


    int  updateByPrimaryKeySelective(Activity activity);

    int delete(@Param("id") int id);

    List<Coupon> selectedCoupons(@Param("couponIds") String[] couponIds);

    List<Card> selectedCard(@Param("cardIds") String[] cardIds);

    //先查出type为2或者3的活动
    @Select("select * from activity where type!=1 and status!=102 and eTime >=NOW()")
    List<Activity> showActivity();
    //平台端展示type为2或者3的活动
    @Select("select * from activity where type!=1 ")
    List<Activity> showPcActivity();
}
